package leo.weixin.entity.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import leo.weixin.common.Const;
import leo.weixin.entity.message.BaseMessage;
import lombok.Data;

import java.util.Map;

/**
 * 文本消息
 * <xml>
 *   <ToUserName><![CDATA[toUser]]></ToUserName>
 *   <FromUserName><![CDATA[fromUser]]></FromUserName>
 *   <CreateTime>12345678</CreateTime>
 *   <MsgType><![CDATA[text]]></MsgType>
 *   <Content><![CDATA[你好]]></Content>
 * </xml>
 */
@Data
@XStreamAlias("xml")
public class TextMessage extends BaseMessage {
    @XStreamAlias("Content")
    private String content ;  //文本消息的内容
    public TextMessage(Map<String, String> requestMap,String content) {
        super(requestMap);
        this.setMsgType(Const.MsgTypeEnum.TEXT);
        this.content = content ;
    }
}
